package com.zhj.taopiaopiao;

import android.app.Activity;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.view.LayoutInflater;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;

import pay.zhj.com.paystand.PayInterface;

public class BaseActivity extends Activity implements PayInterface{
    protected Activity that;


    @Override
    public void attach(Activity proxyActivity) {
        that = proxyActivity;
    }

    @Override
    public void setContentView(View view) {
        if(that == null){
            super.setContentView(view);
        }else {
            that.setContentView(view);
        }
    }

    @Override
    public void setContentView(int layoutResID) {
        if(that == null){
            super.setContentView(layoutResID);
        }else {
            that.setContentView(layoutResID);
        }
    }

    @Override
    public <T extends View> T findViewById(int id) {
        return that.findViewById(id);
    }


    @Override
    public Intent getIntent() {
        return that.getIntent();
    }


    @Override
    public ClassLoader getClassLoader() {
        return that.getClassLoader();
    }


    @NonNull
    @Override
    public LayoutInflater getLayoutInflater() {
        return that.getLayoutInflater();
    }

    @Override
    public ApplicationInfo getApplicationInfo() {
        return that.getApplicationInfo();
    }


    @Override
    public Window getWindow() {
        return that.getWindow();
    }


    @Override
    public WindowManager getWindowManager() {
        return that.getWindowManager();
    }

    @Override
    public void finish() {
        that.finish();
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {

    }

    @Override
    public void onStart() {

    }

    @Override
    public void onResume() {

    }

    @Override
    public void onPause() {

    }

    @Override
    public void onStop() {

    }

    @Override
    public void onDestroy() {

    }

    @Override
    public void onSaveInstanceState(Bundle outState) {

    }
}
